SetAxisMotionProfile
Configures the motion settings of an axis.
Syntax
KsError SetAxisMotionProfile(
int Index,
McProfileType ProfileType,
McProfileSettings Settings
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
ProfileType: determines the unit for acceleration, deceleration, and jerk. See the McProfileType type.
Settings: adjusts the motion settings of an axis. See the McProfileSettings structure.
Return value
If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.
Example
Copy
McProfileSettings Motion = {
3, //MINIMUM_ERROR
360, //MAXIMUM_ERROR
3600, //MAXIMUM_VELOCITY
36000, //MAXIMUM_ACCELERATION
36000, //MAXIMUM_DECELERATION
3600000, //MAXIMUM_JERK
0 //MAXIMUM_JOLT
};
KsError nRet = SetAxisMotionProfile(0, McProfileType::profileUnitPerSecond, Motion);
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also